import axios from 'axios'

const http = axios.create({
  headers: {
    'content-type': 'application/json',
    'client-type': type,
    clientid: uuid,
    // 'Authorization': localStorage.getItem('auth')
  },
})

// 预处理留登录凭证处理
http.interceptors.request.use((config) => {
  // let auth = useAuthStore().auth ? useAuthStore().auth : localStorage.getItem('auth') ;
  let auth = 'debug'
  config.headers.Authorization = auth
  return config
})

export default http
